import { resolve } from "node:path";
import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";

export default defineConfig(async () => {
  const Unocss = await import("unocss/vite").then((i) => i.default);

  return {
    resolve: {
      alias: {
        "~/": `${resolve(__dirname, "src")}/`,
      },
    },
    plugins: [Unocss(), uni()],
  };
});
